3.63 \(\int \frac{A+B \log (e (\frac{a+b x}{c+d x})^n)}{(f+g x)^2} \, dx\)

Optimal. Leaf size=91 \[ \frac{(a+b x) \left (B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )+A\right )}{(f+g x) (b f-a g)}+\frac{B n (b c-a d) \log \left (\frac{f+g x}{c+d x}\right )}{(b f-a g) (d f-c g)} \]

[Out]

((a + b*x)*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/((b*f - a*g)*(f + g*x)) + (B*(b*c - a*d)*n*Log[(f + g*x)/(c
 + d*x)])/((b*f - a*g)*(d*f - c*g))

________________________________________________________________________________________

Rubi [A]  time = 0.124769, antiderivative size = 119, normalized size of antiderivative = 1.31, number of steps used = 4, number of rules used = 3, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {2525, 12, 72} \[ -\frac{B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )+A}{g (f+g x)}+\frac{B n (b c-a d) \log (f+g x)}{(b f-a g) (d f-c g)}+\frac{b B n \log (a+b x)}{g (b f-a g)}-\frac{B d n \log (c+d x)}{g (d f-c g)} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*Log[e*((a + b*x)/(c + d*x))^n])/(f + g*x)^2,x]

[Out]

(b*B*n*Log[a + b*x])/(g*(b*f - a*g)) - (A + B*Log[e*((a + b*x)/(c + d*x))^n])/(g*(f + g*x)) - (B*d*n*Log[c + d
*x])/(g*(d*f - c*g)) + (B*(b*c - a*d)*n*Log[f + g*x])/((b*f - a*g)*(d*f - c*g))

Rule 2525

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.)*((d_.) + (e_.)*(x_))^(m_.), x_Symbol] :> Simp[((d + e*x)^(m
+ 1)*(a + b*Log[c*RFx^p])^n)/(e*(m + 1)), x] - Dist[(b*n*p)/(e*(m + 1)), Int[SimplifyIntegrand[((d + e*x)^(m +
 1)*(a + b*Log[c*RFx^p])^(n - 1)*D[RFx, x])/RFx, x], x], x] /; FreeQ[{a, b, c, d, e, m, p}, x] && RationalFunc
tionQ[RFx, x] && IGtQ[n, 0] && (EqQ[n, 1] || IntegerQ[m]) && NeQ[m, -1]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 72

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rubi steps

\begin{align*} \int \frac{A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )}{(f+g x)^2} \, dx &=-\frac{A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )}{g (f+g x)}+\frac{(B n) \int \frac{b c-a d}{(a+b x) (c+d x) (f+g x)} \, dx}{g}\\ &=-\frac{A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )}{g (f+g x)}+\frac{(B (b c-a d) n) \int \frac{1}{(a+b x) (c+d x) (f+g x)} \, dx}{g}\\ &=-\frac{A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )}{g (f+g x)}+\frac{(B (b c-a d) n) \int \left (\frac{b^2}{(b c-a d) (b f-a g) (a+b x)}+\frac{d^2}{(b c-a d) (-d f+c g) (c+d x)}+\frac{g^2}{(b f-a g) (d f-c g) (f+g x)}\right ) \, dx}{g}\\ &=\frac{b B n \log (a+b x)}{g (b f-a g)}-\frac{A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )}{g (f+g x)}-\frac{B d n \log (c+d x)}{g (d f-c g)}+\frac{B (b c-a d) n \log (f+g x)}{(b f-a g) (d f-c g)}\\ \end{align*}

Mathematica [A]  time = 0.182617, size = 109, normalized size = 1.2 \[ \frac{\frac{B n (b \log (a+b x) (d f-c g)+\log (c+d x) (a d g-b d f)+g (b c-a d) \log (f+g x))}{(b f-a g) (d f-c g)}-\frac{B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )+A}{f+g x}}{g} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*Log[e*((a + b*x)/(c + d*x))^n])/(f + g*x)^2,x]

[Out]

(-((A + B*Log[e*((a + b*x)/(c + d*x))^n])/(f + g*x)) + (B*n*(b*(d*f - c*g)*Log[a + b*x] + (-(b*d*f) + a*d*g)*L
og[c + d*x] + (b*c - a*d)*g*Log[f + g*x]))/((b*f - a*g)*(d*f - c*g)))/g

________________________________________________________________________________________

Maple [F]  time = 0.513, size = 0, normalized size = 0. \begin{align*} \int{\frac{1}{ \left ( gx+f \right ) ^{2}} \left ( A+B\ln \left ( e \left ({\frac{bx+a}{dx+c}} \right ) ^{n} \right ) \right ) }\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*ln(e*((b*x+a)/(d*x+c))^n))/(g*x+f)^2,x)

[Out]

int((A+B*ln(e*((b*x+a)/(d*x+c))^n))/(g*x+f)^2,x)

________________________________________________________________________________________

Maxima [A]  time = 1.184, size = 192, normalized size = 2.11 \begin{align*} B n{\left (\frac{b \log \left (b x + a\right )}{b f g - a g^{2}} - \frac{d \log \left (d x + c\right )}{d f g - c g^{2}} + \frac{{\left (b c - a d\right )} \log \left (g x + f\right )}{b d f^{2} + a c g^{2} -{\left (b c + a d\right )} f g}\right )} - \frac{B \log \left (e{\left (\frac{b x}{d x + c} + \frac{a}{d x + c}\right )}^{n}\right )}{g^{2} x + f g} - \frac{A}{g^{2} x + f g} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))/(g*x+f)^2,x, algorithm="maxima")

[Out]

B*n*(b*log(b*x + a)/(b*f*g - a*g^2) - d*log(d*x + c)/(d*f*g - c*g^2) + (b*c - a*d)*log(g*x + f)/(b*d*f^2 + a*c
*g^2 - (b*c + a*d)*f*g)) - B*log(e*(b*x/(d*x + c) + a/(d*x + c))^n)/(g^2*x + f*g) - A/(g^2*x + f*g)

________________________________________________________________________________________

Fricas [B]  time = 17.4685, size = 652, normalized size = 7.16 \begin{align*} -\frac{A b d f^{2} + A a c g^{2} -{\left (A b c + A a d\right )} f g +{\left (B b d f^{2} + B a c g^{2} -{\left (B b c + B a d\right )} f g\right )} n \log \left (\frac{b x + a}{d x + c}\right ) -{\left ({\left (B b d f g - B b c g^{2}\right )} n x +{\left (B b d f^{2} - B b c f g\right )} n\right )} \log \left (b x + a\right ) +{\left ({\left (B b d f g - B a d g^{2}\right )} n x +{\left (B b d f^{2} - B a d f g\right )} n\right )} \log \left (d x + c\right ) -{\left ({\left (B b c - B a d\right )} g^{2} n x +{\left (B b c - B a d\right )} f g n\right )} \log \left (g x + f\right ) +{\left (B b d f^{2} + B a c g^{2} -{\left (B b c + B a d\right )} f g\right )} \log \left (e\right )}{b d f^{3} g + a c f g^{3} -{\left (b c + a d\right )} f^{2} g^{2} +{\left (b d f^{2} g^{2} + a c g^{4} -{\left (b c + a d\right )} f g^{3}\right )} x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))/(g*x+f)^2,x, algorithm="fricas")

[Out]

-(A*b*d*f^2 + A*a*c*g^2 - (A*b*c + A*a*d)*f*g + (B*b*d*f^2 + B*a*c*g^2 - (B*b*c + B*a*d)*f*g)*n*log((b*x + a)/
(d*x + c)) - ((B*b*d*f*g - B*b*c*g^2)*n*x + (B*b*d*f^2 - B*b*c*f*g)*n)*log(b*x + a) + ((B*b*d*f*g - B*a*d*g^2)
*n*x + (B*b*d*f^2 - B*a*d*f*g)*n)*log(d*x + c) - ((B*b*c - B*a*d)*g^2*n*x + (B*b*c - B*a*d)*f*g*n)*log(g*x + f
) + (B*b*d*f^2 + B*a*c*g^2 - (B*b*c + B*a*d)*f*g)*log(e))/(b*d*f^3*g + a*c*f*g^3 - (b*c + a*d)*f^2*g^2 + (b*d*
f^2*g^2 + a*c*g^4 - (b*c + a*d)*f*g^3)*x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*ln(e*((b*x+a)/(d*x+c))**n))/(g*x+f)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.33159, size = 390, normalized size = 4.29 \begin{align*} -\frac{B n \log \left (\frac{b x + a}{d x + c}\right )}{g^{2} x + f g} + \frac{{\left (B b c n - B a d n\right )} \log \left (g x + f\right )}{b d f^{2} - b c f g - a d f g + a c g^{2}} - \frac{{\left (B b c n - B a d n\right )} \log \left ({\left | b d x^{2} + b c x + a d x + a c \right |}\right )}{2 \,{\left (b d f^{2} - b c f g - a d f g + a c g^{2}\right )}} - \frac{A + B}{g^{2} x + f g} + \frac{{\left (2 \, B b^{2} c d f n - 2 \, B a b d^{2} f n - B b^{2} c^{2} g n + B a^{2} d^{2} g n\right )} \log \left ({\left | \frac{2 \, b d x + b c + a d -{\left | -b c + a d \right |}}{2 \, b d x + b c + a d +{\left | -b c + a d \right |}} \right |}\right )}{2 \,{\left (b d f^{2} g - b c f g^{2} - a d f g^{2} + a c g^{3}\right )}{\left | -b c + a d \right |}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))/(g*x+f)^2,x, algorithm="giac")

[Out]

-B*n*log((b*x + a)/(d*x + c))/(g^2*x + f*g) + (B*b*c*n - B*a*d*n)*log(g*x + f)/(b*d*f^2 - b*c*f*g - a*d*f*g +
a*c*g^2) - 1/2*(B*b*c*n - B*a*d*n)*log(abs(b*d*x^2 + b*c*x + a*d*x + a*c))/(b*d*f^2 - b*c*f*g - a*d*f*g + a*c*
g^2) - (A + B)/(g^2*x + f*g) + 1/2*(2*B*b^2*c*d*f*n - 2*B*a*b*d^2*f*n - B*b^2*c^2*g*n + B*a^2*d^2*g*n)*log(abs
((2*b*d*x + b*c + a*d - abs(-b*c + a*d))/(2*b*d*x + b*c + a*d + abs(-b*c + a*d))))/((b*d*f^2*g - b*c*f*g^2 - a
*d*f*g^2 + a*c*g^3)*abs(-b*c + a*d))